home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Drag.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  25.0 KB  |  847 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Drag.a
  3. ;
  4. ;    Contains:    Drag and Drop Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DRAG__') = 'UNDEFINED' THEN
  19. __DRAG__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  31.     include 'AppleEvents.a'
  32.     ENDIF
  33.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  34.     include 'Quickdraw.a'
  35.     ENDIF
  36.  
  37.  
  38. ;  _________________________________________________________________________________________________________
  39. ;      
  40. ;   • DRAG MANAGER DATA TYPES
  41. ;  _________________________________________________________________________________________________________
  42.  
  43.  
  44.  
  45.  
  46.  
  47. ; typedef UInt32                         ItemReference
  48.  
  49. ; typedef OSType                         FlavorType
  50.  
  51.  
  52. ;  _________________________________________________________________________________________________________
  53. ;      
  54. ;   • DRAG ATTRIBUTES
  55. ;  _________________________________________________________________________________________________________
  56.  
  57.  
  58.  
  59. ; typedef OptionBits                     DragAttributes
  60.  
  61.  
  62. kDragHasLeftSenderWindow        EQU        $00000001            ; drag has left the source window since TrackDrag
  63. kDragInsideSenderApplication    EQU        $00000002            ; drag is occurring within the sender application
  64. kDragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window
  65.  
  66. ;  _________________________________________________________________________________________________________
  67. ;      
  68. ;   • DRAG IMAGE FLAGS
  69. ;  _________________________________________________________________________________________________________
  70.  
  71.  
  72.  
  73. ; typedef OptionBits                     DragImageFlags
  74.  
  75.  
  76. kDragRegionAndImage                EQU        $00000010            ; drag region and image
  77.  
  78. ;  _________________________________________________________________________________________________________
  79. ;      
  80. ;   • DRAG IMAGE TRANSLUCENCY LEVELS
  81. ;  _________________________________________________________________________________________________________
  82.  
  83.  
  84.  
  85. ; typedef UInt32                         DragImageTranslucency
  86.  
  87.  
  88. kDragStandardTranslucency        EQU        0                    ; 65% image translucency (standard)
  89. kDragDarkTranslucency            EQU        1                    ; 50% image translucency
  90. kDragDarkerTranslucency            EQU        2                    ; 25% image translucency
  91. kDragOpaqueTranslucency            EQU        3                    ; 0% image translucency (opaque)
  92.  
  93. ;  _________________________________________________________________________________________________________
  94. ;      
  95. ;   • DRAG DRAWING PROCEDURE MESSAGES
  96. ;  _________________________________________________________________________________________________________
  97.  
  98.  
  99.  
  100. ; typedef SInt16                         DragRegionMessage
  101.  
  102.  
  103. kDragRegionBegin                EQU        1                    ; initialize drawing
  104. kDragRegionDraw                    EQU        2                    ; draw drag feedback
  105. kDragRegionHide                    EQU        3                    ; hide drag feedback
  106. kDragRegionIdle                    EQU        4                    ; drag feedback idle time
  107. kDragRegionEnd                    EQU        5                    ; end of drawing
  108.  
  109. ;  _________________________________________________________________________________________________________
  110. ;      
  111. ;   • ZOOM ACCELERATION
  112. ;  _________________________________________________________________________________________________________
  113.  
  114.  
  115.  
  116. ; typedef SInt16                         ZoomAcceleration
  117.  
  118.  
  119. kZoomNoAcceleration                EQU        0                    ; use linear interpolation
  120. kZoomAccelerate                    EQU        1                    ; ramp up step size
  121. kZoomDecelerate                    EQU        2                    ; ramp down step size
  122.  
  123. ;  _________________________________________________________________________________________________________
  124. ;      
  125. ;   • FLAVOR FLAGS
  126. ;  _________________________________________________________________________________________________________
  127.  
  128.  
  129.  
  130. ; typedef OptionBits                     FlavorFlags
  131.  
  132.  
  133. flavorSenderOnly                EQU        $01                    ; flavor is available to sender only
  134. flavorSenderTranslated            EQU        $02                    ; flavor is translated by sender
  135. flavorNotSaved                    EQU        $04                    ; flavor should not be saved
  136. flavorSystemTranslated            EQU        $0100                ; flavor is translated by system
  137.  
  138. ;  _________________________________________________________________________________________________________
  139. ;      
  140. ;   • SPECIAL FLAVORS
  141. ;  _________________________________________________________________________________________________________
  142.  
  143.  
  144.  
  145.  
  146. flavorTypeHFS                    EQU        'hfs '                ; flavor type for HFS data
  147. flavorTypePromiseHFS            EQU        'phfs'                ; flavor type for promised HFS data
  148. flavorTypeDirectory                EQU        'diry'                ; flavor type for AOCE directories
  149.  
  150. ;  _________________________________________________________________________________________________________
  151. ;      
  152. ;   • FLAVORS FOR FINDER 8.0 AND LATER
  153. ;  _________________________________________________________________________________________________________
  154.  
  155.  
  156.  
  157.  
  158. kFlavorTypeClippingName            EQU        'clnm'                ; name hint for clipping file (preferred over 'clfn')
  159. kFlavorTypeClippingFilename        EQU        'clfn'                ; name for clipping file
  160. kFlavorTypeDragToTrashOnly        EQU        'fdtt'                ; for apps that want to allow dragging private data to the trash
  161. kFlavorTypeFinderNoTrackingBehavior EQU    'fntb'                ; Finder completely ignores any drag containing this flavor
  162.  
  163. ;  _________________________________________________________________________________________________________
  164. ;      
  165. ;   • DRAG TRACKING HANDLER MESSAGES
  166. ;  _________________________________________________________________________________________________________
  167.  
  168.  
  169.  
  170. ; typedef SInt16                         DragTrackingMessage
  171.  
  172.  
  173. kDragTrackingEnterHandler        EQU        1                    ; drag has entered handler
  174. kDragTrackingEnterWindow        EQU        2                    ; drag has entered window
  175. kDragTrackingInWindow            EQU        3                    ; drag is moving within window
  176. kDragTrackingLeaveWindow        EQU        4                    ; drag has exited window
  177. kDragTrackingLeaveHandler        EQU        5                    ; drag has exited handler
  178.  
  179. ;  _________________________________________________________________________________________________________
  180. ;      
  181. ;   • HFS FLAVORS
  182. ;  _________________________________________________________________________________________________________
  183.  
  184.  
  185.  
  186. HFSFlavor                RECORD 0
  187. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  188. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  189. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  190. fileSpec                 ds        FSSpec            ; offset: $A (10)        ;  file system specification 
  191. sizeof                     EQU *                    ; size:   $50 (80)
  192.                         ENDR
  193. PromiseHFSFlavor        RECORD 0
  194. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  195. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  196. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  197. promisedFlavor             ds.l    1                ; offset: $A (10)        ;  promised flavor containing an FSSpec 
  198. sizeof                     EQU *                    ; size:   $E (14)
  199.                         ENDR
  200.  
  201. ;  _________________________________________________________________________________________________________
  202. ;      
  203. ;   • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  204. ;  _________________________________________________________________________________________________________
  205.  
  206.  
  207.  
  208. ;  _________________________________________________________________________________________________________
  209. ;      
  210. ;   • APPLICATION-DEFINED ROUTINES
  211. ;  _________________________________________________________________________________________________________
  212.  
  213.  
  214.  
  215. ;  _________________________________________________________________________________________________________
  216. ;      
  217. ;   • INSTALLING AND REMOVING HANDLERS API'S
  218. ;  _________________________________________________________________________________________________________
  219.  
  220.  
  221.  
  222. ;
  223. ; pascal OSErr InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow, void *handlerRefCon)
  224. ;
  225.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  226.         Macro
  227.         _InstallTrackingHandler
  228.             moveq               #1,D0
  229.             dc.w                $ABED
  230.         EndM
  231.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  232.         IMPORT_CFM_FUNCTION InstallTrackingHandler
  233.     ENDIF
  234.  
  235. ;
  236. ; pascal OSErr InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow, void *handlerRefCon)
  237. ;
  238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  239.         Macro
  240.         _InstallReceiveHandler
  241.             moveq               #2,D0
  242.             dc.w                $ABED
  243.         EndM
  244.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  245.         IMPORT_CFM_FUNCTION InstallReceiveHandler
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal OSErr RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow)
  250. ;
  251.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  252.         Macro
  253.         _RemoveTrackingHandler
  254.             moveq               #3,D0
  255.             dc.w                $ABED
  256.         EndM
  257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  258.         IMPORT_CFM_FUNCTION RemoveTrackingHandler
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal OSErr RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow)
  263. ;
  264.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  265.         Macro
  266.         _RemoveReceiveHandler
  267.             moveq               #4,D0
  268.             dc.w                $ABED
  269.         EndM
  270.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  271.         IMPORT_CFM_FUNCTION RemoveReceiveHandler
  272.     ENDIF
  273.  
  274.  
  275. ;  _________________________________________________________________________________________________________
  276. ;      
  277. ;   • CREATING & DISPOSING
  278. ;  _________________________________________________________________________________________________________
  279.  
  280.  
  281.  
  282. ;
  283. ; pascal OSErr NewDrag(DragReference *theDrag)
  284. ;
  285.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  286.         Macro
  287.         _NewDrag
  288.             moveq               #5,D0
  289.             dc.w                $ABED
  290.         EndM
  291.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  292.         IMPORT_CFM_FUNCTION NewDrag
  293.     ENDIF
  294.  
  295. ;
  296. ; pascal OSErr DisposeDrag(DragReference theDrag)
  297. ;
  298.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  299.         Macro
  300.         _DisposeDrag
  301.             moveq               #6,D0
  302.             dc.w                $ABED
  303.         EndM
  304.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION DisposeDrag
  306.     ENDIF
  307.  
  308.  
  309. ;  _________________________________________________________________________________________________________
  310. ;      
  311. ;   • ADDING DRAG ITEM FLAVORS
  312. ;  _________________________________________________________________________________________________________
  313.  
  314.  
  315.  
  316. ;
  317. ; pascal OSErr AddDragItemFlavor(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
  318. ;
  319.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  320.         Macro
  321.         _AddDragItemFlavor
  322.             moveq               #7,D0
  323.             dc.w                $ABED
  324.         EndM
  325.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  326.         IMPORT_CFM_FUNCTION AddDragItemFlavor
  327.     ENDIF
  328.  
  329. ;
  330. ; pascal OSErr SetDragItemFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
  331. ;
  332.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  333.         Macro
  334.         _SetDragItemFlavorData
  335.             moveq               #9,D0
  336.             dc.w                $ABED
  337.         EndM
  338.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  339.         IMPORT_CFM_FUNCTION SetDragItemFlavorData
  340.     ENDIF
  341.  
  342.  
  343. ;  _________________________________________________________________________________________________________
  344. ;      
  345. ;   • PROVIDING CALLBACK PROCEDURES
  346. ;  _________________________________________________________________________________________________________
  347.  
  348.  
  349.  
  350. ;
  351. ; pascal OSErr SetDragSendProc(DragReference theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  354.         Macro
  355.         _SetDragSendProc
  356.             moveq               #10,D0
  357.             dc.w                $ABED
  358.         EndM
  359.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  360.         IMPORT_CFM_FUNCTION SetDragSendProc
  361.     ENDIF
  362.  
  363.  
  364. ;
  365. ; pascal OSErr SetDragInputProc(DragReference theDrag, DragInputUPP inputProc, void *dragInputRefCon)
  366. ;
  367.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  368.         Macro
  369.         _SetDragInputProc
  370.             moveq               #11,D0
  371.             dc.w                $ABED
  372.         EndM
  373.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  374.         IMPORT_CFM_FUNCTION SetDragInputProc
  375.     ENDIF
  376.  
  377. ;
  378. ; pascal OSErr SetDragDrawingProc(DragReference theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
  379. ;
  380.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  381.         Macro
  382.         _SetDragDrawingProc
  383.             moveq               #12,D0
  384.             dc.w                $ABED
  385.         EndM
  386.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION SetDragDrawingProc
  388.     ENDIF
  389.  
  390.  
  391. ;  _________________________________________________________________________________________________________
  392. ;      
  393. ;   • SETTING THE DRAG IMAGE
  394. ;  _________________________________________________________________________________________________________
  395.  
  396.  
  397.  
  398. ;
  399. ; pascal OSErr SetDragImage(DragReference theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  402.         Macro
  403.         _SetDragImage
  404.             moveq               #39,D0
  405.             dc.w                $ABED
  406.         EndM
  407.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  408.         IMPORT_CFM_FUNCTION SetDragImage
  409.     ENDIF
  410.  
  411.  
  412. ;  _________________________________________________________________________________________________________
  413. ;      
  414. ;   • PERFORMING A DRAG
  415. ;  _________________________________________________________________________________________________________
  416.  
  417.  
  418.  
  419. ;
  420. ; pascal OSErr TrackDrag(DragReference theDrag, const EventRecord *theEvent, RgnHandle theRegion)
  421. ;
  422.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  423.         Macro
  424.         _TrackDrag
  425.             moveq               #13,D0
  426.             dc.w                $ABED
  427.         EndM
  428.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION TrackDrag
  430.     ENDIF
  431.  
  432.  
  433. ;  _________________________________________________________________________________________________________
  434. ;      
  435. ;   • GETTING DRAG ITEM INFORMATION
  436. ;  _________________________________________________________________________________________________________
  437.  
  438.  
  439.  
  440. ;
  441. ; pascal OSErr CountDragItems(DragReference theDrag, UInt16 *numItems)
  442. ;
  443.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  444.         Macro
  445.         _CountDragItems
  446.             moveq               #14,D0
  447.             dc.w                $ABED
  448.         EndM
  449.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  450.         IMPORT_CFM_FUNCTION CountDragItems
  451.     ENDIF
  452.  
  453. ;
  454. ; pascal OSErr GetDragItemReferenceNumber(DragReference theDrag, UInt16 index, ItemReference *theItemRef)
  455. ;
  456.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  457.         Macro
  458.         _GetDragItemReferenceNumber
  459.             moveq               #15,D0
  460.             dc.w                $ABED
  461.         EndM
  462.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  463.         IMPORT_CFM_FUNCTION GetDragItemReferenceNumber
  464.     ENDIF
  465.  
  466. ;
  467. ; pascal OSErr CountDragItemFlavors(DragReference theDrag, ItemReference theItemRef, UInt16 *numFlavors)
  468. ;
  469.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  470.         Macro
  471.         _CountDragItemFlavors
  472.             moveq               #16,D0
  473.             dc.w                $ABED
  474.         EndM
  475.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION CountDragItemFlavors
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal OSErr GetFlavorType(DragReference theDrag, ItemReference theItemRef, UInt16 index, FlavorType *theType)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  483.         Macro
  484.         _GetFlavorType
  485.             moveq               #17,D0
  486.             dc.w                $ABED
  487.         EndM
  488.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  489.         IMPORT_CFM_FUNCTION GetFlavorType
  490.     ENDIF
  491.  
  492. ;
  493. ; pascal OSErr GetFlavorFlags(DragReference theDrag, ItemReference theItemRef, FlavorType theType, FlavorFlags *theFlags)
  494. ;
  495.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  496.         Macro
  497.         _GetFlavorFlags
  498.             moveq               #18,D0
  499.             dc.w                $ABED
  500.         EndM
  501.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  502.         IMPORT_CFM_FUNCTION GetFlavorFlags
  503.     ENDIF
  504.  
  505. ;
  506. ; pascal OSErr GetFlavorDataSize(DragReference theDrag, ItemReference theItemRef, FlavorType theType, Size *dataSize)
  507. ;
  508.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  509.         Macro
  510.         _GetFlavorDataSize
  511.             moveq               #19,D0
  512.             dc.w                $ABED
  513.         EndM
  514.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  515.         IMPORT_CFM_FUNCTION GetFlavorDataSize
  516.     ENDIF
  517.  
  518. ;
  519. ; pascal OSErr GetFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
  520. ;
  521.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  522.         Macro
  523.         _GetFlavorData
  524.             moveq               #20,D0
  525.             dc.w                $ABED
  526.         EndM
  527.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION GetFlavorData
  529.     ENDIF
  530.  
  531.  
  532. ;  _________________________________________________________________________________________________________
  533. ;      
  534. ;   • DRAG ITEM BOUNDS
  535. ;  _________________________________________________________________________________________________________
  536.  
  537.  
  538.  
  539. ;
  540. ; pascal OSErr GetDragItemBounds(DragReference theDrag, ItemReference theItemRef, Rect *itemBounds)
  541. ;
  542.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  543.         Macro
  544.         _GetDragItemBounds
  545.             moveq               #21,D0
  546.             dc.w                $ABED
  547.         EndM
  548.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  549.         IMPORT_CFM_FUNCTION GetDragItemBounds
  550.     ENDIF
  551.  
  552. ;
  553. ; pascal OSErr SetDragItemBounds(DragReference theDrag, ItemReference theItemRef, const Rect *itemBounds)
  554. ;
  555.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  556.         Macro
  557.         _SetDragItemBounds
  558.             moveq               #22,D0
  559.             dc.w                $ABED
  560.         EndM
  561.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION SetDragItemBounds
  563.     ENDIF
  564.  
  565.  
  566. ;  _________________________________________________________________________________________________________
  567. ;      
  568. ;   • DROP LOCATIONS
  569. ;  _________________________________________________________________________________________________________
  570.  
  571.  
  572.  
  573. ;
  574. ; pascal OSErr GetDropLocation(DragReference theDrag, AEDesc *dropLocation)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  577.         Macro
  578.         _GetDropLocation
  579.             moveq               #23,D0
  580.             dc.w                $ABED
  581.         EndM
  582.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION GetDropLocation
  584.     ENDIF
  585.  
  586. ;
  587. ; pascal OSErr SetDropLocation(DragReference theDrag, const AEDesc *dropLocation)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         Macro
  591.         _SetDropLocation
  592.             moveq               #24,D0
  593.             dc.w                $ABED
  594.         EndM
  595.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  596.         IMPORT_CFM_FUNCTION SetDropLocation
  597.     ENDIF
  598.  
  599.  
  600. ;  _________________________________________________________________________________________________________
  601. ;      
  602. ;   • GETTING INFORMATION ABOUT A DRAG
  603. ;  _________________________________________________________________________________________________________
  604.  
  605.  
  606.  
  607. ;
  608. ; pascal OSErr GetDragAttributes(DragReference theDrag, DragAttributes *flags)
  609. ;
  610.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  611.         Macro
  612.         _GetDragAttributes
  613.             moveq               #25,D0
  614.             dc.w                $ABED
  615.         EndM
  616.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  617.         IMPORT_CFM_FUNCTION GetDragAttributes
  618.     ENDIF
  619.  
  620. ;
  621. ; pascal OSErr GetDragMouse(DragReference theDrag, Point *mouse, Point *globalPinnedMouse)
  622. ;
  623.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  624.         Macro
  625.         _GetDragMouse
  626.             moveq               #26,D0
  627.             dc.w                $ABED
  628.         EndM
  629.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  630.         IMPORT_CFM_FUNCTION GetDragMouse
  631.     ENDIF
  632.  
  633. ;
  634. ; pascal OSErr SetDragMouse(DragReference theDrag, Point globalPinnedMouse)
  635. ;
  636.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  637.         Macro
  638.         _SetDragMouse
  639.             moveq               #27,D0
  640.             dc.w                $ABED
  641.         EndM
  642.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  643.         IMPORT_CFM_FUNCTION SetDragMouse
  644.     ENDIF
  645.  
  646. ;
  647. ; pascal OSErr GetDragOrigin(DragReference theDrag, Point *globalInitialMouse)
  648. ;
  649.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  650.         Macro
  651.         _GetDragOrigin
  652.             moveq               #28,D0
  653.             dc.w                $ABED
  654.         EndM
  655.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  656.         IMPORT_CFM_FUNCTION GetDragOrigin
  657.     ENDIF
  658.  
  659. ;
  660. ; pascal OSErr GetDragModifiers(DragReference theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
  661. ;
  662.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  663.         Macro
  664.         _GetDragModifiers
  665.             moveq               #29,D0
  666.             dc.w                $ABED
  667.         EndM
  668.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  669.         IMPORT_CFM_FUNCTION GetDragModifiers
  670.     ENDIF
  671.  
  672.  
  673. ;  _________________________________________________________________________________________________________
  674. ;      
  675. ;   • DRAG HIGHLIGHTING
  676. ;  _________________________________________________________________________________________________________
  677.  
  678.  
  679.  
  680. ;
  681. ; pascal OSErr ShowDragHilite(DragReference theDrag, RgnHandle hiliteFrame, Boolean inside)
  682. ;
  683.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  684.         Macro
  685.         _ShowDragHilite
  686.             moveq               #30,D0
  687.             dc.w                $ABED
  688.         EndM
  689.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  690.         IMPORT_CFM_FUNCTION ShowDragHilite
  691.     ENDIF
  692.  
  693. ;
  694. ; pascal OSErr HideDragHilite(DragReference theDrag)
  695. ;
  696.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  697.         Macro
  698.         _HideDragHilite
  699.             moveq               #31,D0
  700.             dc.w                $ABED
  701.         EndM
  702.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  703.         IMPORT_CFM_FUNCTION HideDragHilite
  704.     ENDIF
  705.  
  706. ;
  707. ; pascal OSErr DragPreScroll(DragReference theDrag, SInt16 dH, SInt16 dV)
  708. ;
  709.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  710.         Macro
  711.         _DragPreScroll
  712.             moveq               #32,D0
  713.             dc.w                $ABED
  714.         EndM
  715.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  716.         IMPORT_CFM_FUNCTION DragPreScroll
  717.     ENDIF
  718.  
  719. ;
  720. ; pascal OSErr DragPostScroll(DragReference theDrag)
  721. ;
  722.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  723.         Macro
  724.         _DragPostScroll
  725.             moveq               #33,D0
  726.             dc.w                $ABED
  727.         EndM
  728.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  729.         IMPORT_CFM_FUNCTION DragPostScroll
  730.     ENDIF
  731.  
  732. ;
  733. ; pascal OSErr UpdateDragHilite(DragReference theDrag, RgnHandle updateRgn)
  734. ;
  735.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  736.         Macro
  737.         _UpdateDragHilite
  738.             moveq               #34,D0
  739.             dc.w                $ABED
  740.         EndM
  741.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  742.         IMPORT_CFM_FUNCTION UpdateDragHilite
  743.     ENDIF
  744.  
  745. ;
  746. ; pascal OSErr GetDragHiliteColor(WindowPtr window, RGBColor *color)
  747. ;
  748.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  749.         Macro
  750.         _GetDragHiliteColor
  751.             moveq               #38,D0
  752.             dc.w                $ABED
  753.         EndM
  754.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  755.         IMPORT_CFM_FUNCTION GetDragHiliteColor
  756.     ENDIF
  757.  
  758.  
  759.  
  760. ;  _________________________________________________________________________________________________________
  761. ;      
  762. ;   • UTILITIES
  763. ;  _________________________________________________________________________________________________________
  764.  
  765.  
  766.  
  767.  
  768. ;
  769. ; pascal Boolean WaitMouseMoved(Point initialMouse)
  770. ;
  771.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  772.         Macro
  773.         _WaitMouseMoved
  774.             moveq               #35,D0
  775.             dc.w                $ABED
  776.         EndM
  777.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  778.         IMPORT_CFM_FUNCTION WaitMouseMoved
  779.     ENDIF
  780.  
  781.  
  782. ;
  783. ; pascal OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
  784. ;
  785.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  786.         Macro
  787.         _ZoomRects
  788.             moveq               #36,D0
  789.             dc.w                $ABED
  790.         EndM
  791.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  792.         IMPORT_CFM_FUNCTION ZoomRects
  793.     ENDIF
  794.  
  795. ;
  796. ; pascal OSErr ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
  797. ;
  798.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  799.         Macro
  800.         _ZoomRegion
  801.             moveq               #37,D0
  802.             dc.w                $ABED
  803.         EndM
  804.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  805.         IMPORT_CFM_FUNCTION ZoomRegion
  806.     ENDIF
  807.  
  808.  
  809.  
  810. ;  _________________________________________________________________________________________________________
  811. ;   • OLD NAMES
  812. ;     These are provided for compatiblity with older source bases.  It is recommended to not use them since
  813. ;       they may removed from this interface file at any time.
  814. ;  _________________________________________________________________________________________________________
  815.  
  816.  
  817.  
  818.     IF OLDROUTINENAMES THEN
  819.  
  820. dragHasLeftSenderWindow            EQU        $00000001            ; drag has left the source window since TrackDrag 
  821. dragInsideSenderApplication        EQU        $00000002            ; drag is occurring within the sender application 
  822. dragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window 
  823.  
  824. dragTrackingEnterHandler        EQU        1                    ; drag has entered handler 
  825. dragTrackingEnterWindow            EQU        2                    ; drag has entered window 
  826. dragTrackingInWindow            EQU        3                    ; drag is moving within window 
  827. dragTrackingLeaveWindow            EQU        4                    ; drag has exited window 
  828. dragTrackingLeaveHandler        EQU        5                    ; drag has exited handler 
  829.  
  830. dragRegionBegin                    EQU        1                    ; initialize drawing 
  831. dragRegionDraw                    EQU        2                    ; draw drag feedback 
  832. dragRegionHide                    EQU        3                    ; hide drag feedback 
  833. dragRegionIdle                    EQU        4                    ; drag feedback idle time 
  834. dragRegionEnd                    EQU        5                    ; end of drawing 
  835.  
  836. zoomNoAcceleration                EQU        0                    ; use linear interpolation 
  837. zoomAccelerate                    EQU        1                    ; ramp up step size 
  838. zoomDecelerate                    EQU        2                    ; ramp down step size 
  839.  
  840. kDragStandardImage                EQU        0                    ; 65% image translucency (standard)
  841. kDragDarkImage                    EQU        1                    ; 50% image translucency
  842. kDragDarkerImage                EQU        2                    ; 25% image translucency
  843. kDragOpaqueImage                EQU        3                    ; 0% image translucency (opaque)
  844.     ENDIF    ; OLDROUTINENAMES
  845.     ENDIF ; __DRAG__ 
  846.  
  847.